﻿@model IEnumerable<HdipCricketClub.Models.PlayerSeasonStatistic>

@{
    ViewBag.Title = "BowlingAverages";
}

<h2>Bowling Averages</h2>

@using (Html.BeginForm())
{
    <p>
        Find by Last Name: @Html.TextBox("SearchString")
        <input type="submit" value="Search" />
    </p>
}

<table>
    <tr>
        <th>
            Player:
        </th>
        <th>
            Matches:
        </th>
        <th>
            Overs:
        </th>
        <th>
            Maidens:
        </th>
        <th>
            Runs:
        </th>
        <th>
            Wickets:
        </th>
        <th>
            Average:
        </th>
        <th>
            Runs/Over:
        </th>
        <th>
            Best Bowling:
        </th>
     </tr>

@foreach (var item in Model) {
    <tr>
        <td>
            @Html.DisplayFor(modelItem => item.Member.first_name) @Html.DisplayFor(modelItem => item.Member.last_name)
        </td>
        <td class="column_numbers">
            @Html.DisplayFor(modelItem => item.matches)
        </td>
        <td class="column_numbers">
            @Html.DisplayFor(modelItem => item.overs)
        </td>
        <td class="column_numbers">
            @Html.DisplayFor(modelItem => item.maidens)
        </td>
        <td class="column_numbers">
            @Html.DisplayFor(modelItem => item.bowling_runs)
        </td>
        <td class="column_numbers">
            @Html.DisplayFor(modelItem => item.wickets)
        </td>
        <td class="column_numbers">
            @Html.DisplayFor(modelItem => item.BowlingAverage)
        </td>
        <td class="column_numbers">
            @Html.DisplayFor(modelItem => item.RunsPerOver)
        </td>
        <td class="column_numbers">
            @Html.DisplayFor(modelItem => item.best_bowling_wickets) / @Html.DisplayFor(modelItem => item.best_bowling_runs)
        </td>
    </tr>
}

</table>
